package com.dongqi.cloud.controller;

import com.dongqi.utils.HttpUtils;
import com.dongqi.utils.JsonUtil;
import com.dongqi.utils.RestResult;
import com.dongqi.utils.UuidUtils;
import org.junit.Test;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/cloud")
public class test {

    @GetMapping("/user/test")
    public String userTest(@RequestParam("verify") String verify) {
        System.out.println(verify);
        return verify;
    }

    @Test
    public void test() throws Exception {

        String uuid = UuidUtils.getUUID();
        System.out.println(uuid);
        String uuid2 = UuidUtils.getUUID();
        System.out.println(uuid2);
        String uuid3 = UuidUtils.getUUID();
        System.out.println(uuid3);
        String uuid4 = UuidUtils.getUUID();
        System.out.println(uuid4);
        String uuid5 = UuidUtils.getUUID();
        System.out.println(uuid5);
        //String deviceNo = "01401423122500018186";
        //HashMap<String, List> map = new HashMap<>();
        //List<String> list = new ArrayList<>();
        //list.add(deviceNo);
        //map.put("deviceNos", list);
        //String s = HttpUtils.sendHttpPostJson("https://history.usr.cn:7002/history/lastPosition", JsonUtil.beanToJson(map));
        //System.out.println(s);
    }
}
